package secretaryGUI;

import secretary.defineSemester;
import flexibility.userData;
import guiCode.secretaryScreenCode;
import basic.ClientConsole;

import com.sun.rowset.CachedRowSetImpl;

public class removeStudentFromCourse {
	private secretaryScreenCode ssc;
	private userData students = new userData();
	private defineSemester ds = new defineSemester();
	private updateUpperTableEntries UUTE = new updateUpperTableEntries();
	private updateLowerTableEntries ULTE = new updateLowerTableEntries();
	
	public void removeStudent(ClientConsole myConnection, CachedRowSetImpl crs, secretaryScreenCode code, createSecretaryWindow csw){
		ssc = code;
		//this will show the students available for this semester in the upper table
		students.deleteAll();
		students.addData(418);
		students.addData(1);
		students.addData(ds.identify(ssc.getSemesterForEdit(), myConnection, crs));
		myConnection.acceptMsg(students);
		crs = myConnection.getResults();
		UUTE.update(csw, crs);
		
		students.deleteAll();
		students.addData(419);
		students.addData(1);
		students.addData(ds.identify(ssc.getSemesterForEdit(), myConnection, crs));
		myConnection.acceptMsg(students);
		crs = myConnection.getResults();
		ULTE.update(csw, crs);
		
		csw.lblUP.setText("These are the students that learn in this semester:");
		csw.lblDOWN.setText("These are the courses that are assigned to this semester:");
	}

}
